import datetime

from models.dbmodel import DbModel

class DbTaskRecord(DbModel):
    def __init__(self):
        self.id : str = 0
        self.user_id: int = 0
        self.task_id: int = 0
        self.content: int = ''
        self.erased: int = 0
        self.gmt_create: datetime.datetime = None
        self.gmt_modified: datetime.datetime = None
        
class UiTaskRecord(DbTaskRecord):
    def __init__(self, dbtask: DbTaskRecord):
        for key in dbtask.__dict__.keys():
            setattr(self, key, getattr(dbtask, key))
        self.create_time: str = None
        self.update_time: str = None
        self.user_name: str = None
        self.task_name: str = None